package com.liam.game.ui.plane;

import com.liam.game.util.Utils;

/**
 * 英雄
 */
public class Hero extends FlyObject{


    int moveStep = 15;

    int hp;


    public Hero() {
        img = Utils.getImg("static/img/hero2.png");
        x = 200;
        y = 400;

        w = img.getWidth();
        h = img.getHeight();

        hp = 3;
    }



    public void moveToMouse(int x, int y) {
        this.x = x - w / 2;
        this.y = y - h / 2;
    }

    public void moveUp() {
        y -= moveStep;
    }

    public void moveDown() {
        y += moveStep;
    }

    public void moveLeft() {
        x -= moveStep;
    }

    public void moveRight() {
        x += moveStep;
    }

}
